extract

suspend fun extract(file: Path, dest: Path? = null): Path

Extract an archive, looking at the file extension and using existing autodetection capabilities (i.e. tar -a) to determine the format.

Tested on everything in here:

  • .7z (Windows only)

  • .tar

  • .zip

  • .tar.gz

  • .tar.bz2

Parameters

file

path to the archive

dest

destination directory. Will be a temp directory if null.

Sources

js source
Link copied to clipboard